<template>
  <div class="info-box">
    <div class="items">
    <div class="item">版本信息</div>
      <!-- <div class="item">
        <div class="name">Path:</div>
        <div class="value">{{ path }}</div>
      </div>
      <div class="item">
        <div class="name">Route Name:</div>
        <div class="value">{{ name }}</div>
      </div> -->
      <div class="item">
        <div class="name">Vue.js:</div>
        <div class="value">{{ vue }}</div>
      </div>
      <div class="item">
        <div class="name">Electron:</div>
        <div class="value">{{ electron }}</div>
      </div>
      <div class="item">
        <div class="name">Node:</div>
        <div class="value">{{ node }}</div>
      </div>
      <div class="item">
        <div class="name">操作系统:</div>
        <div class="value">{{ platform }}</div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        electron: process.versions.electron,
        name: this.$route.name,
        node: process.versions.node,
        path: this.$route.path,
        platform: require('os').platform(),
        vue: require('vue/package.json').version
      }
    }
  }
</script>

<style scoped>
  .title {
    color: #fff;
    font-weight: initial;
    letter-spacing: .25px;
    margin-top: 10px;
  }

  .items { 
    font-size: 12px;
    display: flex;
    flex-direction: row;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
  }

  .item {
    display: flex;
    flex-direction: row;
    margin-bottom: 6px;
    margin-right: 20px;
  }

  .item .name {
    color: #ffffff;
    margin-right: 6px;
  }

  .item .value {
    color: #ffffff;
    font-weight: bold;
  }
</style>
